package main

import (
	"go.uber.org/zap"
	"google.golang.org/grpc"
	"net"
	_ "vehicle_management_srv/init"
	"vehicle_management_srv/internal/srv"
	pb "vehicle_management_srv/proto"
)

func main() {
	listen, err := net.Listen("tcp", "127.0.0.1:50052")
	if err != nil {
		zap.S().Error(err)
	}
	zap.S().Info("listen ", listen.Addr())
	s := grpc.NewServer()
	pb.RegisterVehicleServer(s, &srv.Servers{})
	err = s.Serve(listen)
	if err != nil {
		zap.S().Error(err)
	}
}
